package com.heima.model.comment.pojos;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import java.io.Serializable;
import java.util.Date;

@Data
@Document("ap_comment")
@AllArgsConstructor
@NoArgsConstructor
public class Comment implements Serializable {
    @Id //映射文档中的id
    private String id;
    @Field
    private Integer authorId;//作者的id
    @Field
    private String authorName;//作者的名字
    @Field
    private String entryId; //文章id
    @Field
    private Integer channelId;//频道id
    @Field
    private Integer type;//文档的类型
    @Field
    private String content;//文档内容
    @Field
    private String image;//图片链接
    @Field
    private Integer likes;//文档的点赞数
    @Field
    private Short reply;//文档的回复数
    @Field
    private Short flag;//文档的标志
    @Field
    private String longitude;//经度
    @Field
    private String latitude; // 纬度 Same as longitude
    @Field
    private String address; // 地址 Assuming it can be null or of some specific type (e.g., String), need further clarification
    @Field
    private String ord;//优先级
    @Field
    private Date createdTime;
    @Field
    private Date updatedTime;
    @Field
    private Short operation;//文档的操作类型0点赞1取消
}

